<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
    <meta charset="UTF-8">
    <title>列表认养产品</title>
    <style>
        .hander_zx{font-size:18px}.conten{background:#fff;margin-top:10px}.conten ul{overflow:hidden;padding:0;margin:0;border-bottom:1px solid #e5e5e5}.conten_floet li{float:left;list-style:none;line-height:45px;text-align:center;width:100px;cursor:pointer;color:#212121;padding:0 10px;}.active{color:#14d882!important;border-bottom:3px solid #14d882}.push_fx li{float:left;font-size:14px;list-style:none;width:10%;text-align:center;background:#f8f8f8;line-height:45px;color:#1f1f1f}.lick_push li{float:left;font-size:14px;width:10%;text-align:center;line-height:45px;list-style:none;color:#616161}.lick_push li:last-child{color:#14d882!important}.lick_push li:last-child span:nth-child(1){margin-right:5px}.lick_push li:last-child span{cursor:pointer}
    </style>
    <link rel="stylesheet" href="../css/paging.css">
    <link rel="stylesheet" href="../css/finacnce.css">
    <!--引入finacnce对内部做修正的CSS-->
    <style>
        .tab_wont li{
            width: 9.5% !important;
            overflow: hidden;
        }
        .tab_wont li:last-child{
            cursor: pointer;
        }
    </style>
</head>
<body style="height:100%;overflow-x: hidden">
<!--//hander-->
<div class="hander_zx" style="padding: 5px 0 0 10px;">财务报表</div>
<!--内容-->
<div class="conten">
    <ul class="conten_floet">
        <li class="active product">商品销售列表</li>
    </ul>
    <!--搜索拦-->
    <div class="input_corder">
        <div>
            <div class="pink_wo">
                <span>订单日期：</span>
                <div>
                    <input onclick="SetDate(this,'yyyy-MM-dd')" class="date_code" id="start_date">
                </div>
                <div>
                    <img src="../cw_img/cw_img1.png" alt="">
                </div>
            </div>
            <div class="pink_wo">
                <span>至</span>
            </div>
            <div class="pink_wo">
                <div></div>
                <div>
                    <input onclick="SetDate(this,'yyyy-MM-dd')" class="date_code" id="end_date">
                </div>
                <div>
                    <img src="../cw_img/cw_img1.png" alt="">
                </div>
            </div>
        </div>
        <div style="margin-left: 20px;">
            <div class="pink_wo">
                <span>选择类型：</span>
                <div class="get_type">
                    购买用户
                </div>
                <div>
                    <img src="../cw_img/cw_img2.png" alt="" class="wp_img_ws">
                </div>
            </div>
            <div class="pink_wo" style="margin-left: 15px;">
                <div></div>
                <div>
                    <input type="text" style="width: 100%;height:100%;border:none;text-align: center" id="_sale_push">
                </div>
                <div>
                    <img src="../cw_img/cw_img3.png" alt="" style="width: 15px;">
                </div>
            </div>
        </div>
    </div>
    <div style="padding-bottom: 10px;" class="input_corder">
        <div>
            <div class="pink_wo">
                <span>订单状态：</span>
                <div style="width: 139px;">
                    <select class="SelectList" id="t_bs">
                        <option value="null">全部</option>
                        <option value="0">已取消</option>
                        <option value="1">未付款</option>
                        <option value="2">待发货</option>
                        <option value="3">待收货</option>
                        <option value="5">已完成</option>
                    </select>
                </div>
            </div>
            <div class="pink_wo" style="margin-left: 20px;">
                <span>付款方式：</span>
                <div style="width: 139px;">
                    <select class="SelectList" id="d_bs">
                        <option value="null">全部</option>
                        <option value="钱包支付">钱包支付</option>
                        <option value="微信支付">微信支付</option>
                        <option value="新浪支付">新浪支付</option>
                    </select>
                </div>
            </div>
            <div class="pink_wo" style="margin-left: 20px;">
                <span>售后服务：</span>
                <div style="width: 139px;">
                    <select class="SelectList" id="a_bs">
                        <option value="null">全部</option>
                        <option value="0">未申请</option>
                        <option value="1">处理中</option>
                        <option value="2">已处理</option>
                    </select>
                </div>
            </div>
            <button class="dc_btn" id="query_up">查询</button>
            <button class="dc_btn" id="export_up" style="margin-left: 15px;">导出</button>
        </div>
    </div>
    <div class="tab_wont">
        <ul style="background: #F8F8F8">
            <li>订单日期</li>
            <li>购买用户</li>
            <li>商品总价(元)</li>
            <li>运费(元)</li>
            <li>订单状态</li>
            <li>付款方式</li>
            <li>售后服务</li>
            <li style="width: 12% !important;">渠道来源</li>
            <li style="width: 12% !important;">订单号</li>
            <li>操作</li>
        </ul>
        <div class="bg_data">

        </div>
    </div>
    <div class="box" id="box" style="display:block;"></div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/2.1.1-rc2/jquery.min.js"></script>
<script src="../js/data.js"></script>
<script src="../js/paging.min.js"></script>
<script>
    "use strict";$(function(){var sale_start_date;var sale_end_date;var sale_state;var sale_pay;var sale_shfw;var _sale_push;$("#query_up").on('click',function(){sale_start_date=$("#start_date").val();typeof sale_start_date=="string"&&sale_start_date==""?sale_start_date=null:sale_start_date;sale_end_date=$("#end_date").val();typeof sale_end_date=="string"&&sale_end_date==""?sale_end_date=null:sale_end_date;sale_state=$("#t_bs").val();typeof sale_state=="string"&&sale_state=="null"?sale_state=null:sale_state;sale_pay=$("#d_bs").val();typeof sale_pay=="string"&&sale_pay=="null"?sale_pay=null:sale_pay;sale_shfw=$("#a_bs").val();typeof sale_shfw=="string"&&sale_shfw=="null"?sale_shfw=null:sale_shfw;_sale_push=$("#_sale_push").val();typeof _sale_push=="string"&&_sale_push==""?_sale_push=null:_sale_push;_sale(_sale_push,sale_state,sale_pay,sale_shfw,sale_start_date,sale_end_date)});function _sale(a,b,c,d,f,g){$.ajax({type:'post',url:'/fina/selectorderlist',dataType:'json',contentType:"application/json",data:JSON.stringify({currentPage:1,pageCount:24,nickName:a,shop_name:null,total_price_mix:null,total_price_max:null,status:b,bankname:c,back:d,start_time:f,end_time:g}),success:function success(data){sale_page(data.num,a,b,c,d,f,g)}})}_sale(null,null,null,null,null,null);function sale_page(e,a,b,c,d,f,g){if(typeof e==='number'&&e>0){$("#box").css("display","block")}else{$("#box").css("display","none")}var total=Math.ceil(e/24);$('#box').paging({initPageNo:1,totalPages:total,totalCount:'合计'+e+'条数据',slideSpeed:600,jump:true,callback:function callback(page){$.ajax({type:'post',url:'/fina/selectorderlist',dataType:'json',contentType:"application/json",data:JSON.stringify({currentPage:page,pageCount:24,nickName:a,shop_name:null,total_price_mix:null,total_price_max:null,status:b,bankname:c,back:d,start_time:f,end_time:g}),success:function success(data){var info=data.data;var html="";for(var i=0;i<info.length;i++){html+="\n                                    <ul>\n                                        <li>"+formatDate(info[i].addtime)+"</li>\n                                        <li>"+info[i].nickname+"</li>\n                                        <li>"+info[i].total_price+"</li>\n                                        <li>"+info[i].post_remark+"</li>\n                                        <li>"+(info[i].status==0?"已取消":info[i].status==1?"未付款":info[i].status==2?"待发货":info[i].status==3?"待收货":"已完成")+"</li>\n                                        <li>"+info[i].bankname+"</li>\n                                        <li>"+(info[i].back=="0"?"未申请":info[i].back=="1"?"处理中":"已处理")+"</li>\n                                        <li style=\"width: 12% !important;\">"+info[i].shop_name+"</li>\n                                        <li style=\"width: 12% !important;\">"+info[i].order_sn+"</li>\n                                        <li class=\"cz\" data-id=\""+info[i].id+"\" data-uid=\""+info[i].uid+"\">\u67E5\u770B</li>\n                                    </ul>\n                                "}$(".bg_data").html(html)}})}})}function formatDate(now){var now=new Date(now);var year=now.getFullYear();var month=now.getMonth()+1;var date=now.getDate();return year+"-"+fixZero(month,2)+"-"+fixZero(date,2)}function fixZero(num,length){var str=""+num;var len=str.length;var s="";for(var i=length;i-->len;){s+="0"}return s+str}$(".bg_data").on('click','.cz',function(){var code_html="";var bottom_left_html="";var bottom_right_html="";$.ajax({type:'post',url:'/fina/selectorderuser',dataType:'json',contentType:"application/json",data:JSON.stringify({id:$(this).attr("data-id"),uid:$(this).attr("data-uid")}),success:function success(data){var inof_p=data.data.finaOrder;var _link=data.data;code_html+="\n                        <li>\u8BA2\u5355\u65E5\u671F : "+formatDate(inof_p.addtime)+"</li>\n                        <li>\u8D2D\u4E70\u7528\u6237 : "+inof_p.nickname+"</li>\n                        <li>\u5546\u54C1\u603B\u4EF7 ( \u5143 ) : "+inof_p.total_price+"</li>\n                        <li>\u8FD0\u8D39 ( \u5143 ) : "+inof_p.post_remark+"</li>\n                        <li>\u8BA2\u5355\u72B6\u6001 : "+(inof_p.status==0?"已取消":inof_p.status==1?"未付款":inof_p.status==2?"待发货":inof_p.status==3?"待收货":"已完成")+"</li>\n                        <li>\u4ED8\u6B3E\u65B9\u5F0F : "+inof_p.bankname+"</li>\n                        <li>\u6E20\u9053\u6765\u6E90 : "+inof_p.shop_name+"</li>\n                        <li>\u552E\u540E\u670D\u52A1 : "+(inof_p.back=="0"?"未申请":inof_p.back=="1"?"处理中":"已处理")+"</li>\n                        <li>\u8BA2\u5355\u53F7 \uFF1A"+inof_p.order_sn+"</li>\n                    ";bottom_left_html+="\n                        <li>\u59D3\u540D : "+_link.username+"</li>\n                        <li>\u8EAB\u4EFD\u8BC1\u53F7 : "+_link.idcard+"</li>\n                        <li>\u6CE8\u518C\u7535\u8BDD : "+_link.phone+"</li>\n                    ";bottom_right_html+="\n                        <li>\u6211\u7684\u8D44\u4EA7 : "+_link.total_money+"( \u8BA4\u517B\u8D44\u91D1+\u8BA4\u517B\u6536\u76CA\uFF0D\u5DF2\u6D88\u8D39 )</li>\n                        <li>\u5DF2\u6D88\u8D39( \u5546\u54C1\u8D2D\u4E70 ) : "+_link.expenditureMoney+"</li>\n                        <li>\u5B58\u94B1\u7F50( \u5B58\u94B1\u7F50 ) : "+_link.balance+"</li>\n                        <li>\u63A8\u5E7F\u5956\u91D1( \u4F59\u989D ) : "+_link.actual_bounty+"</li>\n                    ";$('._salect',window.parent.document).html(code_html);$('._salect_bottom_left',window.parent.document).html(bottom_left_html);$('._salect_bottom_right',window.parent.document).html(bottom_right_html)}});$('#_sale',window.parent.document).css("display","block")});$("#export_up").on('click',function(){window.open("http://wx.umubao.com/fina/exportExcel")})});
</script>
</html>